You worked with Lapper before, so shouldn't have any problem setting Lapper up straight out of the box.
Since you will be starting from scratch, you can decide anything you want, like:
- Do I want one database for both servers or a database for each server
- Which features do I want and does Lapper have them by default or do I need to make them (ask someone to make them)
- Figure out the details of those features as it's easier to build all in one go, then to keep adding things, which will get messy at some point (codewise that is)
Glad it's working for you now and a nice system you made there.
Good luck with future coding within the Lapper environment and feel free to ask help/directions if you need to.
Which is nearly the same as you had, except that I put in '130' instead of 'GetUserStoredValue($userName," 1XRT")'
The DEBUG message then said: 202
This is the correct answer as 130 / 2.86 = 45.45454545454545 = rounded to zero decimals: 45
Then 247-45 = 202
So the round function is working correctly, when using a static number, which makes me think that the problem is related to the GetUserStoredValue.
Then I tried this:
Still no error about the round function, but I wasn't getting the value '1XRT' either.
After having a close look, I noticed you have a space before 1XRT, so I tried this:
Since I had a problem with numbers being retrieved, while working on the cross-server chat script, I think it would be a good idea to replace GetUserStoredValue with GetUserStoredNum, as that will make sure a number is retrieved from the database.
Hopefully this will help you, otherwise I will be happy to give any assistance.
I haven't been able to reproduce the mentioned bugs anymore (and I tried seriously).
Still have some ideas how this script could be improved, but don't consider them high priority right now.
Thanks for testing, I've seen that first thing myself as well, but couldn't reproduce it solidly.
Will have another look and crack at that one.
The other one I haven't seen myself, but I have an idea what causes it (can even be the same cause as the first issue).
I couldn't find any time to look into the reported issue yesterday, but did find some time today.
Soon I was able to replicate the problem Bass-Driver reported and I ran into another problem as well.
After some attempts to fix both of them, I succeeded, so here's another version.
I've tested with 2 LFS servers running on the same Lapper and also tested by adding short messages (by pressing 'Click to type a short message (max. 72 char) button) as well as longer messages using: !chat [longer message here]
Changelog Cross-server chat V1.02:
-Fixed a bug that caused displaying empty messages when starting from scratch
-Fixed a bug that caused Lapper to throw messages about database being locked
-Changed GetStoredValue to GetStoredNum where possible to get numbers instead of values
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Hmm, seen this error once, but thought it was caused by an external program I use to view/edit the Lapper database.
I haven't done any testing with multiple servers as I assumed it should work, as storedvalue.dbs already is used by multiple Lapper instances (like I have on the AB.nl server (4 LFS servers and all of them have Lapper as well).
Will do some testing tomorrow.
It did some more work on the Proof Of Concept (POC) for a cross-chat server addon for Lapper.
See attached script.
As said, it's a proof of concept so don't ask me about, I want this, can you make that, ect. it's just to proof it's possible to have such script and I have no intention (at the moment) to further extend this script.
Let me know if it is (or isn't) working for those who have multiple servers.
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Could indeed be a useful function.
Now when I want to do some maintanance and people are indeed driving on several of my servers, I have to go to each LFS console and write a message there (or login on each server and write in chat there).
I was in the mood to tackle this request, so I worked on a cross-server chat this afternoon and came up with a proof of concept.
When typing: !chat
You will bring up a GUI to show the last 5 messages (date,time,message) and a button to compose a short (max. 72 characters) message.
After having composed the message, you will get to see a send button and once that is pressed, the message is stored in the Lapper database (it can be done using a text file as well, but using the storevalue.dbs is a better way to handle this).
Another way to enter a message into the chat is by typing: !chat [write your message here]
Using this method, you can write a longer line of text.
There are some things I want to tackle before I release this proof of concept to the community, but at least I know for sure now it can be done and even isn't too hard to accomplish.
I am willing to help (as others have tried to help as well) but you both should provide more information.
Do you see any errors in the ERR logfile that can be found in "LFSLapper V7.0.4.10\bin\default\logs" and if so, what are these errors?
It might also be a good idea to ZIP your includes directory and upload it to this forum, so we can look at the files and see if we can spot a problem.
Right, I've fixed the bug with the UserGroupFromFile problem.
Apparently, I am loading that group in one of my other scripts and therefor never ran into this problem.
Now it's loaded in this script (as well), so the list of admins is there.
Changelog for Set Schedule V2.02:
-Added UserGroupFromFile to Sub 'OnMSO'
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
I will look into the issue with being an admin or not.
The message on the console is selfexplaining
Lapper checks if the value 'SCHDL_CHECK_RSA' is found in the database.
If that isn't the case, it will throw this warning and explains why it is happening.
Typing !ss , then filling in the form for 'General settings' and reloading the Lapper config, will clear the warning.
Of course, I still need to solve the issue with the admin-check, otherwise typing !ss won't get you anywhere
Will get back to you guys about this.
Tonight a bug was reported to me, which is about the UTC time being calculated wrongly from the local time.
I've fixed this bug and while testing, found another one and fixed that as well.
Changelog for Schedule V2.03:
-Fixed a bug in Sub 'Schedule' where UTC was calculated by adding(+) hours to local time, instead of substracting(-) hours from local time
-Fixed a bug in Sub 'Schedule' where Hours were displayed as 24 instead of 00
-Fixed a bug in Sub 'Schedule_trackcheck' where Hours were displayed as 24 instead of 00
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Thanks for this comment and in fact some sort of mini update on what's going on behind the scenes.
LFS still is a great game and will be around for a long time to come, no matter what others will keep saying about it.
I still enjoy the ride and all the possibilities LFS offers me, so thanks for all the hard work Scawen, Eric and Victor.
Programs like Airio and Lapper store such information in their own database for future reference. So you won't be able to find such information elsewhere.
Somebody asked be something about this script and while playing with the buttons, I managed to crash Lapper, which lead to this being written into the logfile:
Sadly I haven't been able to reproduce this crash, so no idea what went wrong exactly.
I made a small improvement to the script, by limiting the user input to only the valid values for each field.
When an invalid value is entered, a warning is shown telling the user what the valid valies for that field are.
Changelog for V1.1:
- Restricted user input for each field to only valid values for that field, otherwise display a warning
Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
I've created this little test-script for streets, tested it and it's working as intended.
The 'test_street' is situated down the pitlane of track BL1 (see attached screenshot).